Refactor the code that computes the acceleration.  Also fix a sign bug.

Name the `0` and similarly confusing arguments.