Improve cookiejar, get rid of static methods.