Added some common methods to a base class for yaml, will refactored the xml loader soon