updated README.md
fixed a few issues and code cleanup.