window class updates,
many bugs fixed