Autoformatted code. Changed DeleteCookie function. Made parsing headers
as external function.