Minor fixes.
Update README.md.
Refactor the codes.