1.7.2 dev batch2

Further changes from 0.9.2 to 1.7.2, mostly because sporklin asked me to make a pull request...