Setting up admin pages, refactoring controllers and templates