Algorithms: new structure for routing algorithms

* Adds generic routing algorithm