Move heartbeat into its own middleware package, and change the public method to Route