Moved script tags at the end of the file main.html
Moved all script tags at the end of the body in main.html