Rewrote all script.