Pass the quantities by reference.

This does *not* address #167.