Minor changes in naming and coding style.