Cleanup; fix compile errors