Changed naming of variables to be more consistent.