More improvements along the same trend

The two biggest changes are that friction is now implemented more
correctly and the simulation continues to run until all of the balls
stop moving (as opposed to just some arbitrary limit).