Updating purchase-logs.js. No more delegate