Added logic to remove certain fields from object in the db