broke out all rendering code to seperate classes from MainWindow.