Readme.md update and code refactoring.