Improve coverage, remove dead code