Added support for $or, $nor, $and