Re-add some accidentally removed return statements
Switch to logging module

The homemade logging system using print statements and debug variables on each class has now been replaced with the standard python logging module.