Code refoctoring