Changed input and implemented window visibility