Refactoring and updating submodules