Common routines.