Pull Request 4 fixup

This is updated from pull request 4 to fix the issues that I found.