Reverted some changes that were a mistake which now gets the tests closer to passing.