Earlier quoted context omitted.
Can you explain this code?
Definitely. Here's a gist, feel free to comment with any questions! https://gist.github.com/christianbundy/8954786
Why not distribute that as the code in the repo instead of the compressed version?