Refactor the AMA Fetching rake task