Added basic method for switching between views