Add documentation

Closes #24.
(cherry picked from commit 24d9c17)