Refactor to streamline API related to context blocks and target action blocks.