Move URI construction into its own module