Reorganize backend