Device playlists & two-way sync

Thomas,

Here is the updated pull request with *working* code. Sorry about that!