Minor refactoring to improve design.
Mostly for segregation of responsibilities. This module should not be trying to "open a DE window" when it fundamentally has no idea what a de window is.