Refactoring the backend project