remove unnecessary fields from object classes