Agreed.  We might want to move these functions into their own helpers at some point since they're more general purpose.  But leave them here for now.