Added docstring, revised names.