Replaced ApiFunc helpers with an extension method.

All 575u, 339i tests pass.