Remove init hacks. Fix numerous bugs. Create a testcase that current doesn't work.