Fixed compilation issues, added division.  Tests indicate that it is operating correctly.