Added a new class: SubAction and modified methods to utilize it.