refactoring related to camera and input