Improved build and update-router so only one call is needed to update-router.