Did some refactoring and added in camera functionality