Adds residuals and database chapter