various coding style improvements