Split router.c and routerkeys.c into separate modules