Cookies settings refactor