fix errors

fix the import errors and several simple problems
Merge pull request #1 from joeyzhang1989/master

fix errors