Merging into master tree from dev.

I unfortunately push some changes from my personal fork into the master branch of this repo. It's time to merge in the work done in dev to the master branch. We're getting close to a release (0.4.0) anyway :smile: 
no comment.