Moved inline scripts to the end of page