move GeoExplorer code out of the template