Refactor code move to DataManager class and reduce repeated code