More refactoring to make DSMs useable externally