Moving some extern template declarations to a more appropriate location