Refactored so that Main is the only thing that needs to load into a
window.