Added the start of a common library of functions