Fix various warnings, NOTEs, etc