#2, #3
#4, #5, #6
Merge pull request #1 from davidhemphill/bugfix

#2, #3