First draft of the backend.