Modified functions in Command pattern classes

Signed-off-by: Mihaela Martinas <martinas.mihaela21@gmail.com>