Minor refactoring, rename of parameters to meet MS conventions