fix compile warnings, minor styling