Refactor element tests

A lot of this change is trying to get each line to fit in under 80
characters.