Added cookieTest. Minor other changes.