Commands refactoring