Removes unused fields