Refactored playlist. Now handles both playlist index and master index.