Removes useless classes