Add checking of more warnings + fix some of them
Strip trailing whitespace