General clean-up of special functions