Merge dev into master. Fixes #3