modifications to place scripts at the foot of the layout