Separate out changes from pull request #228 .