set specific header options
parse cookies
little bit of cleanup