Commenting and separating out templates into separate exposed functions. Still needs to detect events on playlist.