More up to date pull request

Addresses issues #3, #4, and #5, and updates on pull request #6