Moved dialog methods to config object (which is made to a singleton). Refactored D3D classes.