Total refactoring of everything