Refactoring and changes to README