map.js: cleaned up code

Clarified some function names and got rid of some things we obviously
aren't using anymore