Refactoring, lots of cleanup
Readme update