Added code for window creation