Some utility functions have been added.