refactored camera class for simpler management