Remove deadwood
Fix tests