Improve test suite and improve coverage