Changes based on chris' feedback on pull request #1