Add window creation code