imporved behavior of logical connectors and added comparison

fixed logical connectors AND,OR,NOT
they now honor the spec and have test cases for this behavior
added comparison operators that also honor type