Clean up with a helper function.