Revert " Use array of function names instead of iterating over object"

This reverts commit d8fb62296324fde6043d4b5879c6a581faab7995.