Reformatted the code a little bit.  Also renamed `convert_cookies` to `render_cookies` to be more clear.