The newly added files in my github repo correspond to the fieldmapper_IDL.  The parse_xml_2_array.php picks relevant data from the /server/reports/fm_IDL.xml, and dynamically create an associative array. This array is then used by fieldmapper.php to create all classes dynamically and write it to classfieldmapper.php. classfieldmapper.php also includes an abstract class called fieldmapper_class_abstract.php. There is a function which encodes a fieldmapper class object to json, and another which does the opposite. Thus, now we can directly use the services and methods for all required functions.

I also tried to clean and indent my code.