structuring project + refactoring