Level Class

Sorted out some bad main class coding by moving many functions and
variables to a new level class.