Replace logical_not with ~ operator
Minor doc changes/typo fixes