Fixed a few bugs and rewrote readout config logic.