cosmit
NXP-14374: externalize load from document from es
NXP-14374: indent, clean
NXP-14678: fix randomness by not assuming on number of pending docs, just count the number of command processed