Commands Refactor Part 2 - rebased

This supercedes #263