Fix PMD, refactor mass action dispatcher