Router code re-format