Refactoring and adding project structure