Moving debugR into its own module (because it uses trace)