Calculator:  resolve outstanding issues.

Intended to fix issues #207 and #270.

Adds some tests for the mentioned cases, plus some extras to help clarify how everything will work.