Add miscellaneous needed functions