1330 1343 ccc refactoring

this is currently the best version of the consistency checker