Improving test coverage, removing vestigial code