Can you move the above three functions to a common helper object?