Refactor purchasing profile generation