cleanup of variable names and comments