Merge pull request #89 from charsleysa/master

Various fixes, additions, and optimizations