Move purchase flow state into separate state object
Mark some internal classes as package level scope
Consolidate variables