Use helper function.

Rename some functions to be clearer.