Improved scripting. Changed regex.