Code refactoring tier 1