Partally abstracted away gevent dependency, which will allow for the possibility of using other async libraries.