Generally useful low level routines
