fixed ENCODEING bug.
Added NOTICE
Adapted to fullfill Apache 2.0 License.