some cleanup, refactoring and camera