Fixed a few minor bugs with the equations and tests per Bro. Jackson's suggestion