Refactor out more map logic