Less invasive error messages and other fixes.

@jpasichnyk  Fixes