Added miscellaneous utility functions