Fixes #30, added documentation