move head and scripts to seperated files