Code for release version 0.4