Refactoring

Merge the two getCookie functions into one. The default return value should be `''`, which means we also need to change a little code in the Graph.