Major Code refractoring