Cleaned up index.ejs and moved chat into its own js file.