Refactoring views and router to allow toggling