Changed the structure to make it easy to add yaml support; NOT TESTED
YET!