analysis: remove redundant variables, cleanup variable names