Converted WindowManager to c++ Class format