Implemented minimize, maximize, restore and quit.