1f6128
Refactor the JS to move most of the logic into its own file This also splits the logic over multiple functions to make the code easier to read