Clean up templates, start work on permissions