Cleanup and handle resizing the screen properly