Added some useful new functions.