Refactor each command to another class file