Some cleanup for routing