Added close function for graph/table window.