Move all code dealing with creating auxiliary page elements into Maputilities.js and fix the accompanying inter-page data transfer issues