Generalize and clean up .rc files