check for dup ids in InternalEngine
use local gateway
without start/stop thread
Revert "without start/stop thread"

This reverts commit d8af39b18fdd79b6bcc265df725bcfa20c422d60.