Added miscellaneous helpers and extensions.