Refactor Window class
Refactor window class and remove example specific behavior