Miscellaneous cleanup and removed given/when usage breaking 5.16+.