Refactored code in all files
updated readme
updated readme