tweak error handling. rm wordscanner impl as java doesn't use one.