Replace much of the dummy code with Airavata API calls.