Various fixes

Experimental code is completely untested. Fix 2 and Fix 3 are identical
for now