Refactoring and readme edit.