Using 3.1 compatible Config API for setup

Avoids deprecation notices when testing against master