Added defaultEncoding, new addData method