Tidy up index.gsp

index.gsp was getting a lot of JavaScript in there - put this in
_gps.gsp template now.  Still needs some work on performance and
further JavaScript tidy up.