Made map cleaner and more functional