refactor and fix submodules