condensed code; added updateCamera... functions in the update function; cleaned up other code