Performance improved, valid output, all references followed #8 #10 #11 #14 #15