Some small work on window/context code.