PLD: cleanup and add tests for routes