Fixed ajax protection of a document page (and whitespaces).
Avoided loading of OpenLayers and jQuery if they are not needed.