Added normalize and minor improvements

Added normalize, support for page templates and various minor
improvements.