0.4.0.0

merge 0.4.0.0 branch back to master.