Refactor to use SnakeYaml