variable names cleanup
more code cleanup and variable renaming