Cosmetic fixes, several other improvements, fix advisories