add restore impl. till window
add layout to Window object
many untested modifications...