Remove some duplicate and unnecessary test code