Debug mode
Implemented type_condition + misc fixes and improvements