Bug fix and variable name changes.