Should @lkursell be added to this? From the discussion it sounds like he provided a bunch of input on the code.