reimplemented DeMorgan and fixed other visitors