Fix code style.
Reduce class fan out by introducing sub command specific excpetions.