Clean up Router code.