Small purchase app refactorizing