Add colours to canvas rendering, pull out JS into its own file