Backend refactorings