Abstracted camera into a seperate class.
This allows multiple types of cameras to be used without changing
the main loop. Also cleaned some other cruft.