Improved (again) box collisions. Probably not final yet.