Change structure, refactor dependencies