Hey @justin, does the above look pretty close?
I’m going to take another look at this soon and submit a PR.