Used a StreamBuilder to kill some while loops.