moved script to layout
remove unnecessary cruft