moved the script tags to the end
moved the script tags to the end and fixed a formatting issue