Refactors translation#generate route
further progress on translation algorithm. wip