Code review fixes and cleanup.
Revert to using basic errors.