model.js given its first round of testing; fixed

A cursory testing of model.js's functionally was performed.
All issues found have been fixed.
More complete testing of calculations is needed, but basic
functionally should be functioning as expected.