Fixed Reinvestments and a number of other minor bugs.

Closes #176