Config extraction1

First step. The config is defined outside now.