Converted libevent methods to use context memory mangement