Change a few variable names.
Various fixes