slot machine: Remove call-time pass by references
User flow tool: fix query order bug