Massive project refactoring