View switching

Added functionality to switch between different views.