Better function signatures and cleaner tests.

* Introduces type Playlist
* Prefixed stored playlist related functions with "Playlist".
* DRYed up some playlist related tests.