Preparing data for the backend.