Changed tristate buffer parameters order.
Fixed parameters in gate subclasses.
Fixed gates parameters again
Fixed and tested tristate buffer.