Moving logic to flush changes to the repository itself since it no longer needs to be shared.