tweak style, fix some warnings