cleanup some parameter names,
rename some variables