Removed all uses of libevent except 1, the random generator.