Update README file and refactor code for redability