another major refactor, simplified map.js

brought lost of stuff over to the api i.e. data req by views