Style changes

yet another try. Split into pieces for easier reviewing.