refactored camera, trackball with encapsulation