cleanup; added some replacements