Sort code blocks