Last commit fixes #3, fixes #4, and fixes #5.