Map cleanup

This cleans up the map code formatting a bit and drops uses the scene() hook directly
rather than tracking an extra variable.