some refactoring, updated tests, fixed a bug in the spotify URI/URL parsing logic