Refactoring flash