Remove culprit

Removes the variable culprit from the function error and the tests.

As before, most of the diffs are in the refactor.