Code refactort.