Clarified tests with docstrings and minor changes