cleaned up sample and added static window class