Rewrite tests

This will bring it back to a bit over 93% coverage. The feature tests are still pending because the layout needs to be changed.