Refactoring playlists into service and adding type definitions