Updating Wire and Gate class