Refactoring to clean up the Action implementation