Remove unnecessary constants and deprecated functions.