To follow along, the complete code listing for the Project X Handler is found here.

Let's walk through each of the sections of code to see what this handler does.