General purpose classes and functions.