Clean up cookie/param handling