Fixed index more, removed extra script and added more to main.js