Code improvements for CH12