Remove unused logic
Refactor API call.