Clean up router registration code