Removes unneeded classes