Action parsing and refactoring