Partially complete #27
Implement #27 in the document module, still needs documentation
Write a little documentation for the exposed functions so that I can close #27