All tests working again after big refactoring.