Miscellaneous tools used by other classes.