Remove code that was duplicated
Fix test