Fix camera bug + refactoring.