Move out router into its own module