removing references to unused components