Refactorings in preparation for Multi-backend