Updated basic template, PageEditor code rewritten, minor bugs fixed