improved the cookies manager.