[Cookie] Refactor cookie and jar