command system refactor