Cleaned up view switch