Update CHANGELOG and version for 0.4.0