Existing tests pass, some debug output and hacks to get so far.