Updated code to better use the Plex API and not hack around some of the issues