Merge dev into master

This will get the master branch up to date. 

We'll need to work out a branching policy if collaboration is to go smoothly. :)