Refactor dependencies into explicit "with" methods