(refactor, readme) refactored newly added code and updated readme.