3.0 pull requests

This combines all other pull requests and has some additional fixes:

* Fixes #172