Using factory methods instead of constructors to instantiate EasyYaml