Some suggestions for improvement

This includes my first pass at improvements. The commit messages provide an idea of what I was going for, but may be unclear. If you have any questions I would be happy to expand.