Fix documentation and variable naming