Some explanatory comments
Add missing docstring
Add some documentation