Refactor some playlist code, needs testing.
More tests and refactoring an ting.