Further refactoring of commands