Improve testing and add coverage reporting