some cleanup of router