Code refatcor