Initial 0.5.x version commit.
Merge with master.