Code cleanup and improve README.md