Added clear and display function for the window.