rc code cleanup