Fixed bugs with data model deletion; added data model test cases