clean-up useless code in all references