Wrote a tutorial in the README, added some comments in the code