Removed "useless" gates and updated testbench.