Wrapped this up in a class.