Command refactor

WIP