Code cleaning and camera enhancements