Code cleanup and bug fixing
README.md added