minor fixes and restylings

See commit messages.