moved script inclusion and fixed indentation