Refactored backend third party API interaction.