Fixes several misnamed variables in `main`.