Feature/472 convert config to yml

Converts config to Yml, validates it and makes config easier to parse.
Personal preference maybe but I'd change this to guard conditions:

```php
if ($state === x) {
  y();
  continue;
}

if ($state === z) {
  a();
  continue;
}

b();
````