Introduce AbstractCommand to handle common command functionality