WSR and performance fixes

Pull request to integrate changes from https://github.com/tylercal/dragonfly-voice

This is the first pull request I've created on GitHub and I didn't realize that they don't allow you to create pull requests for individual commits. If you need me to restructure this to break out each of the changes into a separate pull request, let me know.