Reworked config reader.