Cleaned up camera open code