code cleanup

better variable names, consistent spacing