Added window listeners