better usage of window, better placement of menu during painting