Seperated context creation from window creation