Extract duplicate methods back to utilities module