Fix boolean logic functions.

Correct comments and boolean functions of nand and nor functions. 
Correct syntax to call to correct functions.