Refactor tests
Docstrings