Implemented saving and loading of gates
Saving fully implemented