Issue #18. Plus improved test suite.