Cleaned up the tests a bit. Less code duplication.