Refactors solr core template handling.