Moved script to layout template