Use config for tests + small fixes