Refactoring and added README