Adding in some basic code to handle different views