Common code shared by packages.