Rework AABB collision detection and correction.