minor changes, mostly coding style