Complete refactoring, step 2: project structure