Restructuring to load keys from conf