Added DoInviteWindow, as well as other small changes