Tiding up config parsing and checking