refactor: cleanup Map iteration