Restructuring the backend