Application now stores a pointer to the window and has a function to access the window