Merged changes from 1.0.0 branch.