Refactor dependencies