Complete refactoring of project structure