Code refactoring : performance improvements.