Further refactoring, added camera tracing