google style and fixes for -nw