0.4.0 release

Pushing changes for 0.4.0 release to public dev branch.