Clean up command.py

Command had a number of awkward style issues stemming from the original
design that was heavy in callbacks.  Clean up those issues.

Change-Id: I756e41ac7f909813ce6241f0889a85dd06599b2a
Merge "Clean up command.py"