Moved JS into index.js file