Some cleanup; re-wrote clinical_backend'