Optimization

Folded sub read_conf() into main code.