fix some bugs.
redefine readme.
Merge pull request #29 from jcrom/master

merge with trunk