Implemented logical 'and' and 'or'.