Some changes to use as a submodule