Added cookies, some test code too