Fixed numerous syntax errors in mds_adapter