Separated window class from main