removing templates through ajax

bugfix for creating page templates in Page model