improve code style of the command classes
use output formatter to enhance the console output
add tests for commands