added model excpetion, updated error class, corresponding updates in other classes