minor corrections to variable names etc. for consistency purposes