Gates Class improved

Added addInput, removeInput, resetOutput functions for gates.