fixed a logic mistake in plugIn/Out gate
adjusted the constructor of LogicComponent. Also added constructors for buffer class