Implemented object factories.
Merge branch 'master' of github.com:yangshun/nimble