Update main tests. Fix bugs in config parsing