Various coding style improvements