Rewrite command class with setter and getter for command type
Remove recurring type enum
Add command object as a private field
Add generateCommandObj method