Fix variable names, add docstring.