Updates to pull request 218

Closes #140
Closes #141