Documentation

Adding extra comments into code for clarity, and writing readme.