Now that we understand the basics of how to register Stripe web hooks, let's take a few moments to refactor the code to make it more enjoyable to work with and extend. If we're planning on responding to a number of Stripe events in the future, it's vital that we structure things as elegantly as possible now, rather than later.