Refactor for code review feedback