More variable name changes and slight refactoring.