updated context

Updated the contexts to store a pointer to the current window
internally.  This makes more sense, and will allow access to the window
from anywhere within the context.