Add factory model methods, fix code bugs, and improve test code.
Merge pull request #3 from shengyanli1982/dev Add factory model methods, fix code bugs, and improve test code.
Merge pull request #3 from shengyanli1982/dev Add factory model methods, fix code bugs, and improve test code.