Added churn calculation

Tidied using statements.
Fixed tests