Help refactoring.