Rewrote pan

using PeasyCam's camera.pan() function enabled me to clean up the code
a bit, and it makes the panning work better.