Remove unused code
Increase test coverage