Unifier fixes + debug logging