Added some code for handling playlists