Final tweaks and bug fixes

FInished some final tweaks to the way that the code works as well as a
bug fix for a bug that I discovered while testing.

This commit also includes the help file.

This commit is way too big, but it's been a while!