Updated readme. Some refactoring.