Merge master to beta for testing

Lots of major changes here. See commits for details. Release notes pending.