refactoring camera and event classes