Moves map specs into function
Moves map specs into function