Refactor method MainController#saveTabDataToCard