refactor(bin_residuals): improved docstring and variable naming convention.