Implements the playlist generator