added some more utility functions; changed process_destroy()