Dialyzer cleanup and releated fixes.
Cleaned up the {ok, not_found} miss.
Merge branch 'test' into dev
merge.