First commit: Simulation working with a single gate