CookieAPI: remove, set and refactoring