Handle each coverage element for an item separately.

* Used the ElementInput filter; and
* Rolled back previous changes made on this branch.
Fixed unit tests.