API improvements; cookie support; concurrent safe