Add config in yaml.

Partially complete
Lots of changes