Changed UI code back into modules since loading a new window was
replacing the code for the previous window.