Some utility functions.

OK