Rewrote config to yaml, fixed some other stuff