Format and comment code.

Add a bit of comments to the code. Nothing major. Mostly for educational
purpose.
Update README

Add requirement and installation to README.