Extracted view code into a camera class