That's enough for today

Some variable names changed, some comments added and a bit of onReceipt
logic added in