Cleanup variable names, reduce unneeded operations