Move stuff out from scripts.haml
Moved everything out of scripts.haml.