Some more changes to gevent branch, not sure if I actually want to go down this road after all