Fix some deprecated exception styles and performance improvements
Merge pull request #2 from mattrobenolt/stuff

Fix some deprecated exception styles and performance improvements