Automated testing with compile.sh and made sure that everything compiles

The Switches work, testing of the other classes will be next.
Removed the errors in most functions. The Controller still needs the Logic(), CalculateOffset() and CalculateTransitions() functions. These will be debugged seperately.

Next step is merging this branch back into the main branch and removing the debug specific code.
Removed all of the debugging statements and removed the testing specific code. This to make merging into the main tree easier.