Removes unneeded data.