refactoring: Introduce interface and base class for commands.