Removed redundant code and updated the readme file