Renamed variables in-line with C and Java versions