Refactor some AWS and MTurk calls into /api/