Separated main.html's JS in its own file