Some fixes + first successful testcase.