Cleaned up code in preparation for multiple camera example