Adding changes, including some trained parameters and a catch block in one of the functions.