Fix documentation, handle internal variable more efficiently.