Regroup code blocks