add base model class and custom application errors