Heh, well, yes.  I think this is the question I asked you and Standard8 in IRC a few days ago when starting this patch, and we agreed to just copy-paste for now.

That said, you're totally right, we should do this refactoring.  Given that you've been kind enough to write most of the code for me, how about I do it in the second PR for this card and merge the code we've got as is?