Added command queue and tests.