Merge pull request #57 from menghong777/master

Code clean up.
New temporary database by Joel, please import this to avoid problem
fixed database import bug