minor refactoring, mostly spelling and better param names