Lots of refactorings
Update README.md