Moved some elements of DM sensitivity code into core module.