simple code refactoring and readme updates