Mostly coding style improvements