It looks like we've got a big chunk of almost verbatim duplication here.  Can we do better?