This is a intermediate update, persistent connection is now semi working.
Callback function is segfaulting though.