Modularised cookie.js and context.js