Move the openlayers to a javascript file