Remove unused fields and variables