refactor SQL and R directories