Inline mergeProperties function
Rename utils.encodeCookie => utils.makeCookie
Encoding is optional