Hoist up global functions.