Code refactoring, update README