v2.0.x: refactor util/cookie
v2.0.x: remove extra stuff