Revision

Finalized cookie support. Open for bug checking and code testing.