Refactor rake api:<service_name> tasks