Added commenting and some explanations to the code.
Merge branch 'release/v1.0.1'