got a function or two working. Now trying to sort out the bug where it never lets you download. That is, the downloaded cookie gets set to 1 no matter what/it doesn't download.