Refactor - cleanup and add scripts to index.html