refactoring cont'd
support for resizing/maximizing window
support for fullscreen mode