refactor block actions into separate plugin