Changed approach to window resizing.