add trapWait to Command scheme to avoid race conditions/deadlock among components
Merge branch 'next_commandtrap' into next