Refactor tables in submodules