Improve tests coverage and sanity