Implemented window resize.