Changed submodules to use rewriting instead of reference