code cleanup and README.md update