Added missing code to setOutputState
Fixed signal connections.