Implement path routing code.