Moved script to template file.