Refactored Commands to use polymorphism