Added optimizations for BooleanOps, OrderingOps and ListOps + Tests.