Primitive version using asynchat. TODO: plugins and setup