Pull this inner class out to a top level class file that is a bit more generic.  Right now it is only used here, but we may want to expand that.