clean up, adding braces for readability
added so we don't shift drag the camera sideways
added a dirty flag to the camera so we don't enter an infinite camera/render loop