replaced remaining errors with runtime exceptions