Now possible to enter lat and lon and override gps coordinates.

Also refactored things slightly, moved things into base.css and created a couple of functions.