Remove some unused fields and fix the test