Mass refactoring