Fixes 3160: ActionConstants complexity

Also added a bunch of unit tests and fixed some checkstyle issues.
Merge pull request #3185 from pveentjer/cleanup/3.x/3160-actionconstants-complexity

Fixes 3160: ActionConstants complexity