update to a better default template system, and fix some bugs with the new user permissions