Inital refactoring to use submodule