Merge development into master

This code is staged for the 0.4 release.