Added destroy() and onWindowResized()