Homogenize checks, fix doc checking, remove define warnings