cookie functions & other minor updates