More tidying on mapAPI.js