Remove ded code
Increase test coverage