Improve exception handling and update copyright notice.