Refactor calling functionality into models