Improve test coverage and clean up setup.py