Added some comments.
Changed the data crypting algorithm