Improve tests coverage and minor updates