fix checkstyle.sh and some style errors

should be back to a clean build now I think