Common routines for applications