Changes to encourage inlining and reduce #ifdefs