Refactoring 2nd pass