cleaning up and adding docstrings, EDUID-155