Mostly just handles the window