More tests and implementation for commands