Refactoring to suit submodule.