Debugged the automatic test marking
Removed some unwanted TODOs
General debugging and code cleaning
Gebneral cleaning of code