begin refactoring window manager for simplicity