Fix barf test and optimization parsing