Added setHeaders, getCookie, setViewportSize and fixed setCookie