Pull out most code from custom Rake Task.  Refactor inside of new class.