You could make the script a hell of a lot smaller by using .txt files, but then you wouldn't be able to distribute it very easily!
It works, but I do suggest using a single on TEXT event using $2