initial yaml stuff

- tests should be good
- a bit of cleanup/refactoring necessary
- some TODOs to review (check that I had the right idea)