Big refactoring (together with the next dip commit)
Fix