improved circuit gates

and updated all references