Change handling of routes in a proper way

* preparation for playlist functionality - GSoC @vgezer