Refactored Cookie class.