Skip unnecessary clone in 5-queryGateway, copy some changes from Scoop repo