separate route sort method out.
Add compile method skeleton
use ADDREF to fix the route appending