Wrapped main header, factored out utilities.