Renamed a variable
Moved cookie functions to common.js