Fixes #8. Final updates of code and documentation for release 0.4.1.