Bunch of fixes to the box puzzle