fix some AvsW fxn names, add errcoderef, http prefix