Refactoring, readme, fixes