Added support for playlists to be written on devices
Clean up