Do you mind backing out these helper functions for the sake of this PR? We can talk about adding them and more in another discussion.