put scripts in the right place and moved the main css as the last one