fixing componentChurn and general optimization