Test for the PhysicsBubble and a variety of code cleanups and restructuring.