minor cleanup in kDebugWrite
Following bba099faee3e6
fixed some bugs for zero and unit ideal decomposition
added unit and zero ideal decomposition tests

added some wrappers.