restructuring to allow using the repository directly as a submodule