More clean-up of metaprogramming