fixes #27
Adds some code documentation (#6)