Refactor setup sub-command (#132)