Code refractoring