Refactored code to make generating new Playlists easier