restructured templates and basic support for mod_security