Code

rebase: factor out sub command handling