massive refactoring and changes, so many changes