Command constructor and some tests