Break out cleanup into a utility module.