Removing from Map outside of loop