Refactoring and readme update.