Sierragolf/differ refactoring

this is a still ongoing refactoring of the internals of the framework to provide better testability and maintainability.