Controllers and view pages refactoring