[CLEANUP] - Refactored executeEndpoint