general refactors and adding initial unit tests for playlist interface