Fixed Reported Issues with Pull Request #143

I've gone ahead and fixed all the known issues that were reported with the pull request I did before.
I also have fixed more known bugs.