Change slug handling when storing/updating pages
Add templates to database