FIX: generates documentation, refactors the docstrings in all functions