Code refacroring