Just moving some duplicate methods into a utils package.