Some handy fonctions that are used everywhere.