Added DataModel.swift and refactored code to improvde data model