improve template handling
implement basic page editing