Camera logic and various fixes