Command internal refactoring: better OOP, less code duplication