refactored dw.backend into separate files