Various optimalizations to the metaprograms.